<template>
 <div class="user">
   <login :btnflag="this.btnflag" :loginflag="this.loginflag">
     <template #welcome>
       <h3>欢迎登录智能作平台</h3>
     </template>
     <template #title>
      <div class="title">
        <div class="switchBox">
            <div class="userlogin" @click="this.$router.push('/')">
              <span>登录</span>
            </div>
            <div class="reg" @click="this.$router.push('/registered')">
              <span>注册</span>
            </div>   
        </div>
      </div>
     </template>
     <template #checkLoginIdentity>
       <span @click="this.$router.push('/adminlogin')">管理员登录</span>
     </template>
     <template #checkLoginWay>
       <span @click="checkLoginWay" v-if="this.loginflag">邮箱登录</span>
       <span @click="checkLoginWay" v-else>手机号登录</span>
     </template>
   </login>
 </div>
</template>

<script>
import api from '@/api/user_index'

import login from '@/components/Login/login.vue';
 export default {
  name: 'UserLoginView' ,
 data () {
 return {
   btnflag: 1,
   loginflag: true
  }
 },
 components:{
   login,
 },
 methods:{
   checkLoginWay(){
     this.loginflag = !this.loginflag
   }
 }
}

</script>
<style scope>
</style>